package avicit.bdp.dms.das.dto;

import avicit.bdp.common.base.BaseDTO;
import avicit.platform6.core.annotation.log.FieldRemark;
import avicit.platform6.core.annotation.log.Id;
import avicit.platform6.core.annotation.log.LogField;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.StringUtils;

import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Transient;


/**
 * 数据分层表实体
 * 
 */
@ApiModel(value = "DasLayerDTO", description = "数据分层表")
@Table(name = "bdp_das_layer")
public class LayerDTO extends BaseDTO {

	/**
	* id
	*
	*/
	@LogField
	@ApiModelProperty(value = "id")
	@FieldRemark(column = "id", field = "id", name = "id")
	@Column(name = "id")
	@Id
	@javax.persistence.Id
	private String id;

	/**
	 * 分组名称
	 * 
	 */
	@LogField
	@ApiModelProperty(value = "分组名称")
	@FieldRemark(column = "name", field = "name", name = "分组名称")
	@Column(name = "name")
    private String name;
	/**
	 * 编码
	 * 
	 */
	@LogField
	@ApiModelProperty(value = "编码")
	@FieldRemark(column = "code", field = "code", name = "编码")
	@Column(name = "code")
    private String code;
	/**
	 * 备注
	 * 
	 */
	@LogField
	@ApiModelProperty(value = "备注")
	@FieldRemark(column = "remark", field = "remark", name = "备注")
	@Column(name = "remark")
    private String remark;
	/**
	 * 0-禁用 1-启用
	 * 
	 */
	@LogField
	@ApiModelProperty(value = "0-禁用 1-启用")
	@FieldRemark(column = "status", field = "status", name = "0-禁用 1-启用")
	@Column(name = "status")
    private Integer status;
	/**
	 * 排序
	 * 
	 */
	@LogField
	@ApiModelProperty(value = "排序")
	@FieldRemark(column = "order_by", field = "orderBy", name = "排序")
	@Column(name = "order_by")
    private Integer orderBy;

	@ApiModelProperty(value = "状态")
	@Transient
	private String statusString;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	public Integer getOrderBy() {
		return orderBy;
	}

	public void setOrderBy(Integer orderBy) {
		this.orderBy = orderBy;
	}

	public String getStatusString() {
		return statusString;
	}

	public void setStatusString(String statusString) {
		this.statusString = statusString;
	}

	@Override
	public String getLogFormName() {
		if (StringUtils.isEmpty(super.logFormName)) {
			return "数据分层";
		} else {
			return super.logFormName;
		}
	}

	@Override
	public String getLogTitle() {
		if (StringUtils.isEmpty(super.logTitle)) {
			return "分层";
		} else {
			return super.logTitle;
		}
	}
}

